#!/bin/sh -e

export DESTDIR="$1"

# Let's not use bison as long as we don't need to
patch -p1 < byacc.patch
clsed '/^args/{s/yfile,//;s/cfile/cfile, yfile/;}' gst/parse/gen_grammar.py.in

cl-meson \
    -Ddbghelp=disabled \
    -Dintrospection=disabled \
    -Dexamples=disabled \
    -Ddoc=disabled \
    . output

ninja -C output
ninja -C output install
